package com.shejimoshi.建造者模式.例子;

import com.shejimoshi.建造者模式.common.Computer;

public class ComputerDirector {
    public Computer construct(Builder builder) {
        // 逐步构建复杂产品对象
        Computer computer;
        builder.buildBrand();
        builder.buildCPU();
        builder.buildDisplayCard();
        builder.buildHardDisk();
        builder.buildMainBoard();
        builder.buildMemory();
        builder.buildPower();
        computer = builder.createComputer();
        return computer;
    }
}
